package com.whp02.annotation.configurationclasspostprocessor.ex02config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @author wanghp
 * @version 1.0
 * @description: TODO   test configuration and component annonation diff
 * @date 2020/11/26 21:07
 */
@Configuration
//@Component
public class MyTestConfig {


	@Bean
	public User getUser() {   //user01   user02
		User user = new User();
		user.setUserName("wanghp");

		return user;
	}

	@Bean
	public Person getPerson() {
		Person person = new Person();
		person.setUser(getUser());
		return person;
	}

}
